// app/service/user.js
const Service = require('egg').Service;
const bcrypt = require('bcrypt');

class UserService extends Service {

}

module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;
  const User = app.model.define('user', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    username: { type: STRING(30), allowNull: false, unique: true },
    password: { type: STRING(100), allowNull: false },
  });
  return User;
};